package com.cloud.mybatis.service.impl;

import com.cloud.mybatis.entity.ProductEntity;
import com.cloud.mybatis.mapper.ProductMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class ProductService {

    @Resource
    private ProductMapper productMapper;

    @Transactional
    public void save() {
        ProductEntity productEntity = new ProductEntity();
        productEntity.setName("商品");
        productMapper.save(productEntity);
    }

}
